Motion video data generally has a very large amount of data. Thus, an apparatus which deals with motion video data compresses the motion video data by encoding the motion video data when transmitting the motion video data to another apparatus or storing the motion video data in a storage apparatus. As typical encoding standards for motion videos, Moving Picture Experts Group phase 2 (MPEG-2), MPEG-4, or H.264 MPEG-4 Advanced Video Coding (MPEG-4 AVC/H.264) formulated by the International Standardization Organization/International Elecrotechnical Commission (ISO/IEC) are in wide use.
Such encoding standards adopt an inter-coding method of encoding a picture to be encoded using information on the picture to be encoded and pictures preceding and succeeding the picture to be encoded, and an intra-coding method of encoding the picture to be encoded using only the information on the picture itself.
In general, the amount of code of a picture or a block encoded by the inter-coding method is smaller than the amount of code of a picture or a block encoded by the intra-coding method. Thus, the amount of code for a picture varies within a sequence, depending on a selected encoding mode. Similarly, the amount of code in a block varies within a picture, depending on the selected encoding mode.
Thus, a transmit buffer for data streams is provided in a transmitting apparatus, and a receive buffer for data streams is provided in a receiving apparatus so as to allow a data stream containing encoded motion video to be transmitted at a constant transmission rate even when the amount of code temporally varies. The delay caused by these buffers (hereinafter referred to as a buffer delay) is a major factor in a delay between the input of each picture to an encoder and the display of each decoded picture by a decoder (hereinafter referred to as a display delay). The buffer delay and the display delay are shortened by reducing the sizes of the buffers. However, reducing the sizes of the buffers also reduces the degree of freedom (the degree of a variation in the amount of code) in code allocation for each picture, resulting in degraded image quality of reproduced motion videos.
MPEG-2 and MPEG-4 AVC/H.264 define the operation of a receive buffer in an idealized decoder referred to as the video buffering verifier (VBV) or the coded picture buffer (CPB), respectively. A motion video encoder has to control the amount of code so that the receive buffer in the idealized decoder neither overflows nor underflows. It is stipulated that the idealized decoder performs instantaneous decoding that takes zero time to decode. Japanese Laid-open Publication No. H03-148981, for example, discloses a motion video encoder control method concerning the VBV.